<template>
  <div>
    <h1>vue3生命周期 6个</h1>
  </div>
</template>

<script>
import { onMounted } from 'vue'
export default {
  setup () {
    // 1
    console.log('setup')
    onMounted(() => {
      // 3
      // 1、操作DOM 2、发送ajax请求
      console.log('onMounted1')
    })
    onMounted(() => {
      // 3
      console.log('onMounted2')
    })
  },
  // 2
  created () {
    console.log('created')
  },
  // 4
  mounted () {
    console.log('mounted')
  }
}
</script>

<style lang="sass" scoped>
</style>
